package cn.com.blueInfo.bpm.person.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.person.entity.GroupFormula;
import cn.com.blueInfo.bpm.person.request.GroupFormulaDTO;
import cn.com.blueInfo.bpm.person.response.GroupFormulaVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 群组公式表 对象转换
 * @author suxch
 * @since 2025-08-31 16:18:01
 */
@Mapper(componentModel = "spring")
public interface GroupFormulaConvert
        extends BaseConvert<GroupFormula, GroupFormulaDTO, GroupFormulaVO> {

    GroupFormula dtoToEntity(GroupFormulaDTO dto);

    GroupFormula dtoToEntity(GroupFormulaDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    @Mapping(source = "filterType", target = "filterType", qualifiedByName = "enumToDesc")
    GroupFormulaVO entityToVO(GroupFormula entity);

}